package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotteryCustruledetailDao;
import com.xyz.domain.table.SLotteryCustruledetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotteryCustruledetailLogic {

    @Autowired
    private SLotteryCustruledetailDao sLotteryCustruledetailDao;

    public SLotteryCustruledetail add(SLotteryCustruledetail sLotteryCustruledetail){
        return sLotteryCustruledetailDao.insert(sLotteryCustruledetail);
    }

    public Integer update(SLotteryCustruledetail sLotteryCustruledetail){
        return sLotteryCustruledetailDao.update(sLotteryCustruledetail);
    }

    public List<SLotteryCustruledetail> list(SLotteryCustruledetail sLotteryCustruledetail, String orderBy){
        return sLotteryCustruledetailDao.selectList(sLotteryCustruledetail, orderBy);
    }

    public Integer delete(Integer key){
        return sLotteryCustruledetailDao.delete(key);
    }

    public PageResponseModel<SLotteryCustruledetail> pageInfo(SLotteryCustruledetail sLotteryCustruledetail, String orderBy, Integer pageNo, Integer pageSize){
        return sLotteryCustruledetailDao.selectByPageNo(sLotteryCustruledetail, orderBy, pageNo, pageSize);
    }

}